package core2.ch01file;

import java.util.*;
import java.io.*;

public class ParseProperties {

	Properties properties = new Properties();

	public ParseProperties() {
		try {
			this.parseProp();
		} catch (Exception e) {
			e.printStackTrace();
		}
	}

	public Properties parseProp() throws IOException {
//		InputStream is = this.getClass().getResourceAsStream(
//				"/parse.properties");
//		properties.load(is);
		properties.load(new FileInputStream("src//parse.properties"));
		//is.close();
		return null;
	}

	public String getProperties(String propStr) {
		return properties.getProperty(propStr);
	}

	public static void main(String[] args) {
		ParseProperties pp = new ParseProperties();
		String driver = pp.getProperties("first");
		System.out.println(driver);
	}
}
